<%-- 
    Document   : cad_endereco
    Created on : 16/08/2013, 09:04:19
    Author     : Aluno
--%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Cadastra Endereco</title>
    </head>
    <body>
        <h1>Endereco</h1>
        <form id="form" action="EventoServlet?cmd=salvar" method="POST" >
            <fieldset>
                <legend>Cadastrar Endereco</legend>
                <div class="formataFormulario">
                    <label>Nome:</label>
                    <input name="nome" type="text" size="35" /><br />
                    <label>Artista:</label>
                    <input name="artista" type="text" /> <br />
                    <label>Estilo:</label>
                    <input name="estilo" type="text" /> <br />
                    <label>Descrição:</label>
                    <input name="descricao" type="text" /> <br />
                    <label>Data do Evento:</label>
                    <input name="dataEvento" type="text" /> <br />
                    <select name="idEndereco">
                        <option>Seleciona um Local</option>
                        <c:forEach var="endereco" items="${enderecos}">
                            <option value="${endereco.id}">${endereco.local}</option>
                        </c:forEach>
                    </select>

                    <input type="submit" value="salvar">

                    <c:if test="${!empty msg}">
                        <script type="text/javascript">
                            alert('${msg}');
                        </script>
                    </c:if>
                </div>
            </fieldset>
        </form>
    </body>
</html>
